// 聘用形式
export type TypeOfEmployment = "1" | "2"

// 门店人员返回的数据格式
export interface ShopUserResponse {
    shopid?: string
    userid?: string
    username?: string
    mobile?: unknown
    workNumber?: string // 工号
    typeOfEmployment?: TypeOfEmployment
    locationOfWork?: string //  办公地点
    dept_id?: number
    timeOfEntry?: unknown // 入职时间
    status?: string // 状态
    email?: unknown
    is_manager?: number // 是否是店长
}

// 将聘用形式翻译为中文
export function translateTypeOfEmployment(typeOfEmployment: string) {
    switch (typeOfEmployment) {
        case "1":
            return "全职"
        case "2":
            return "兼职"
        default:
            return "无"
    }
}

// 将是否是店长翻译为中文
export function translateIsManager(isManager: number) {
    switch (isManager) {
        case 1:
            return "是"
        case 0:
            return "否"
        default:
            return "无"
    }
}
